#ifndef IS_FACEDETECT_H_
#define IS_FACEDETECT_H_

#if defined __SHAPI
#undef __SHAPI
#endif

//#define __SHAPI __stdcall

#if defined DLL_EXP
#undef DLL_EXP
#endif

#if defined(_AFXDLL)||defined(_USRDLL)
#define DLL_EXP 
#elif defined(_MSC_VER)&&(_MSC_VER<1200)
#define DLL_EXP 
#else
#define DLL_EXP
#endif

#ifndef FD_OK
#define FD_OK 1
#endif 

typedef struct F_Rect
{
	short int left;
	short int top;
	short int width;
	short int height;
}FRect;

typedef FRect FacePos;


typedef struct _EyeInfo
{
	short int leftx;
	short int lefty;
	short int rightx;
	short int righty;
}EyeInfo;

typedef struct FSize
{
	short int width;
	short int height;
}FSize;

typedef struct _DLLInfo
{
	unsigned short	 Ver;
	unsigned short	 HVer;
	char Des[2];			
	char CompanyAb[8];		
}FDDLLInfo;

#if defined __cplusplus
extern "C" 
{
#endif

	int FDInit(unsigned short,FDDLLInfo *);

	void FDUninit();

	int FDFace( const unsigned char  * pImageData,\
		unsigned short         uWidth, \
		unsigned short         uHeight, \
		int                   * pnFaceNum, \
		FacePos               * pfiFace,\
		EyeInfo               * piiPos=0, \
		double                fScale=1.1, \
		const FSize          * pminVal=0, \
		const FSize          * pmaxVal=0);

	int FDEye( const unsigned char * pImageData, \
		unsigned short      uWidth, \
		unsigned short      uHeight, \
		FacePos             pfiFace,\
		EyeInfo             * piiPos=0, \
		const FSize         * pminVal=0, \
		const FSize         * pmaxVal=0  );
#ifdef __cplusplus
}
#endif

#endif

